package com.shushan.pages.bean;

import com.android.net.bean.NetBaseBean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @ClassName: ExerciseRecordListDetailsBean
 * @Desciption: //练习记录列表详情bean
 * @author: zhangshihao
 * @date: 2018-04-24
 */
public class ExerciseRecordListDetailsBean extends NetBaseBean {

    public int paper_id;
    public String create_time;
    public int exercises_count;//题目总数
    public int right_count;//答对数
    public int score;//成绩
    public int practice_type;//练习类型

    @Override
    public void initByJson(JSONObject jsonObject) throws JSONException {
        paper_id = jsonObject.optInt("paper_id");
        create_time = jsonObject.optString("create_time");
        exercises_count = jsonObject.optInt("exercises_count");
        right_count = jsonObject.optInt("right_count");
        score = jsonObject.optInt("score");
        practice_type = jsonObject.optInt("practice_type");
    }

    @Override
    public String toString() {
        return "paper_id = " + String.valueOf(paper_id) + " ; create_time = " + create_time + " ; exercises_count = " +
                String.valueOf(exercises_count) + " ; right_count = " + String.valueOf(right_count) +
                " ; score = " + String.valueOf(score)+" ; practice_type = "+String.valueOf(practice_type);
    }
}
